package com.xn.myyxcampus.http;

import org.apache.http.NameValuePair;

public class URLHelper {
	
	public static String getURL(String path,
			NameValuePair... nameValuePair) {
		StringBuilder url = new StringBuilder();
		url.append(path);
		if (nameValuePair != null) {
			if (nameValuePair.length > 0) {
				for (int i = 0; i < nameValuePair.length; i++) {
					if (i > 0) {
						// url.append("&");
						url.append("/");
					}
					url.append(nameValuePair[i].getName());
					// url.append("=");
					url.append("/");
					url.append(nameValuePair[i].getValue());
				}
			}
		}
		return url.toString();
	}
}
